#include <REG52.H>

#ifndef __Motor_H__
#define __Motor_H__

sbit right_wheel_a = P3^2;
sbit right_wheel_b = P3^3;

sbit left_wheel_a = P3^4;
sbit left_wheel_b = P3^5;


void forward(){
    right_wheel_a = 1;
    right_wheel_b = 0;
    
    left_wheel_a = 1;
    left_wheel_b = 0;
}

void back(){
    right_wheel_a = 0;
    right_wheel_b = 1;
    
    left_wheel_a = 0;
    left_wheel_b = 1;

}
void goLeft(){
    right_wheel_a = 1;
    right_wheel_b = 0;
    
    left_wheel_a = 0;
    left_wheel_b = 0;

}
void goRight(){
    right_wheel_a = 0;
    right_wheel_b = 0;
    
    left_wheel_a = 1;
    left_wheel_b = 0;

}

void stop(){
    right_wheel_a = 0;
    right_wheel_b = 0;
    
    left_wheel_a = 0;
    left_wheel_b = 0;

}

#endif